package com.zky.gulimall.product;

/**
 * @Description 总经理类
 * @Author 张开源
 * @Date 2022/11/22 22:30
 * @Version 1.0
 **/
public class GeneralManager extends Leader {

    public GeneralManager(String name) {
        super.setName(name);
    }

    @Override
    public void handleLeave(LeaveInfo leaveInfo) {
        if (leaveInfo.getLeaveDays() < 30) {
            System.out.println("员工: " + leaveInfo.getEmpName() + "请假,天数: " + leaveInfo.getLeaveDays() + ",理由: " + leaveInfo.getReason());
            System.out.println("总经理: " + this.name + ",审批通过!");
        } else {
            System.out.println("莫非" + leaveInfo.getEmpName() + "想辞职,居然请假" + leaveInfo.getLeaveDays() + "天!");
        }
    }
}
